<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<title>{$info.title}-华人码</title>
<link rel="stylesheet" type="text/css" href="/IndexPublic/selfhelp/2016825/css/style.css" />
<script src="/IndexPublic/selfhelp/2016825/js/jquery-1.7.1.min.js" type="text/javascript"></script>
<style type="text/css">
#videoinfo {
	width: 100%;
	height: 200px;
	background: url('<if condition="$info.imgurl neq ''">{$info.imgurl}<else />/IndexPublic/index6/img/pic.jpg</if>') 50% 50% no-repeat;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
</style>
</head>

<body>
<!--留言-->
<div class="poplayer1">
	<div class="float-box messages-box" style="border-radius: 5px;">
		<div class="float-content">
			<div class="title-infor"> <img src="/IndexPublic/selfhelp/img/message.png"> </div>
			<textarea style='border: 0;width:90%;display:block;margin:0 auto;padding:10px;' rows='5' id='textarea' placeholder="请输入您遇到的问题及建议..."></textarea>
		</div>
		<div class="float-btn clearfix"> <a style="cursor:pointer;" id="tijiao" class="tijiao" style="font-size: 14px; background-color: #fdaa3d;">提交</a> <a id="quxiao" class="quxiao" style="font-size: 14px; background-color: #808080;">取消</a> </div>
	</div>
</div>

<div class="poplayer">
	<b class="close-btn"><img src="/IndexPublic/selfhelp/2016825/img/close-btn.png"></b>
	<div class="float-information">
		<volist name="platedata" id="data">
		<div class="super-list cleafix">
			<a href="{$data['y_vurl']}" class="super-pic">
				<img src="{$data['y_img1']}">
				<div class="float-text">
					<h4>{$data['y_titleshort']}</h4>
					<em>{$data['y_title']}</em>
				</div>
			</a>
			<div class="super-btn clearfix">
				<div class="watch-count">
					<span>关注度</span>
					<i>{$data['y_guanzhu']}</i>
				</div>
				<div class="btn-box">
					<a href="{$data['y_vurl']}" class="preview-btn"><i class="diy better-diy better-diy2">&#xe60b;</i><br/>预览</a>
					<a class="ad-btn" v="{$data.id}" check="false"><i class="diy better-diy better-diy2">&#xe62e;</i><br/>添加</a>
				</div>
			</div>
		</div>
		</volist>
	</div>
</div>
<div class="w w3">
	<div class="video-box back-poplay">
		<if condition="$info.videourl eq ''">
			<a href="#"> <img src="/IndexPublic/index6/img/pic.jpg"></a>
			<else />
			<video id="videoinfo" src="{$info.videourl}" width="100%" height="200" controls preload="preload">your browser does not support the video tag</video>
		</if>
		<!-- <p><span>播放<br/>10000<span></p> -->
	</div>

	<div class="video-content" style="margin-top: -3px;">
		<div class="content-box">
			<h3>{$info.title}</h3>
			<p class="slide-text">{$info.des}</p>
			<i class="slide-btn">
				<img src="/IndexPublic/selfhelp/2016825/img/slide-btn.png" class="imgbox" srcs="0">
			</i>
		</div>
	</div>
	<div class="better-box">
		<div class="better-content">
			<h5>优质内容</h5>
			<i class="ii">精选内容&nbsp;随你所看</i>
			<div class="better-list">
				<volist name="bindwhcontentdata" id="binddata">
				<div class="better-item clearfix <if condition="$shelfedit neq 1"> addbkuai</if>" nowid='{$binddata.id}' nowplateid="{$binddata.plateid}"<if condition="$shelfedit eq 1"> onclick="location.href='{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_vurl'))}'"</if>>
					<div class="better-pic">
						<img src="{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_img1'))}">
					</div>
					<div class="better-text" style="overflow:hidden; margin-bottom: 3px;">
						<h6>{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_titleshort'))}</h6>
						<em>{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_title'))}</em>
						<div class="concern-style clearfix" <if condition="$shelfedit eq 1">style="margin-top:12px;"</if>>
							<span class="span01">关注度</span>
							<span class="span02">{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_guanzhu'))}</span>
						</div>
						<!--如果是自己做的码才显示-->
						<if condition="$shelfedit neq 1">
						<div class="better-btn clearfix">
							<a class="yulan" ref="{:W('Selfhelp/getwenhuacontentinfo',array('plateid'=>$binddata['plateid'],'field'=>'y_vurl'))}" class="watch-btn"><i class="diy better-diy">&#xe60b;</i>预览</a>
							<a class="binddelete" class="del-btn" style="margin-left: 8px;" id="{$binddata.id}"><i class="diy better-diy">&#xe627;</i>删除</a>
						</div>
						</if>
					</div>
				</div>
				</volist>
			</div>
			<if condition="$shelfedit neq 1">
				<if condition="$datacont eq 1">
					<div class="better-list unadd-box addbkuai"><span>添加+版块</span></div>
				</if>
				<if condition="$datacont eq 0">
					<div class="better-list unadd-box addbkuai"><span>添加+版块</span></div>
					<div class="better-list unadd-box addbkuai"><span>添加+版块</span></div>
				</if>

			</if>
		</div>
		<div class="better-content">
			<h5>每日推送</h5>
			<i class="ii">每日最热资讯等你解读</i>
			<div class="better-list">
				<volist name="recinfo" id="v">
				<if condition="$i lt 6">
				<div class="better-item clearfix" style="height: 72px; clear:both; overflow:hidden;" onclick="location.href='<if condition="$v['y_link'] neq ''">{$v['y_link']}<else />{:C('WEBDOMAIN')}/Yangsheng/ysarticle/id/{$v['id']}</if>'">
					<div class="better-pic better-pic2"><img src="{$v['y_img']}" style="height: 72px; width: 100%;"></div>
					<div class="better-text2 clearfix">
						<h6>{$v['y_title']}</h6>
						<if condition="$v['y_link'] eq ''">
						<p>{$v['content']|strip_tags|msubstr=0,12}</p>
						<else />
						<p>{$v['content']|strip_tags|msubstr=0,24}</p>
						</if>
						<if condition="$v['y_link'] eq ''">
						<div class="icon-box clearfix" style="margin-top: 6px;">
							<b class="watch-icon fr"><i class="diy watch-diy">&#xe62c;</i>{:W('Selfhelp/rand',array('min'=>4000,'max'=>6000))}</b>
							<b class="love-icon fr"><i class="diy love-diy">&#xe624;</i>{:W('Selfhelp/rand',array('min'=>2000,'max'=>3000))}</b>
						</div>
						</if>
					</div>
				</div>
				</if>
				</volist>
			</div>
		</div>
	</div>
</div>
<div class="footer-box clearfix">
	<div class="hover abox"><a href="/Selfhelp/Reg/index/s/{$rand}" class="a1" style="color: #fff;">我要制作</a></div>
	<if condition="$info.shoplink neq ''">
	<div class="abox foot-a"><em>商城</em><i class="diy tag-icon">&#xe625;</i>
		<ul>
			<if condition="$isfwei eq 1"><li><a href="/Home/Fangwei/index/id/{$info.id}/self/1/fromwho/{$info.user_token}">防伪追溯</a></li></if>
			<li><a href="{$info.shoplink}">商城</a></li>
		</ul>
	</div>
	</if>
	<if condition="$info.eplink neq ''">
	<div class="abox foot-a"><em>企业</em><i class="diy tag-icon">&#xe625;</i>
		<ul>
			<if condition="$info.tel neq ''"><li><a href="tel:{$info.tel}">联系电话</a></li></if>
			<li><a href="{$info.eplink}">企业官网</a></li>
		</ul>
	</div>
	</if>
	<div class="abox"><a class="a1" id="liuyan">留言</a></div>
</div>

<script type="text/javascript">
	$(function(){
		$(".content-box").click(function(event) {
			if ($(this).find(".imgbox").attr("srcs")==0) {
				$(this).find(".slide-text").css({"height": 'auto'});
				$(this).find(".imgbox").attr("srcs",1);
				$(this).find(".imgbox").attr("src","/IndexPublic/selfhelp/2016825/img/slide-btn2.png");
				return false;
			}else{
				$(this).find(".slide-text").css({"height": '44px','overflow':'hidden'});
				$(this).find(".imgbox").attr("srcs",0);
				$(this).find(".imgbox").attr("src","/IndexPublic/selfhelp/2016825/img/slide-btn.png");
				return false;
			}
		});

		var slideheight = $("p.slide-text").height();
		if (slideheight<=44) {
			$(".slide-btn").hide();
		}
		if(slideheight>44){
			$(".slide-btn").show();
			$("p.slide-text").css({height: '44px'});
		}

		$(".footer-box .foot-a").each(function(event) {
			$(this).click(function(event) {
				$(this).find("ul").toggle();
				$(this).siblings(".foot-a").find("ul").hide();
				event.stopPropagation();
			});
		});
		$("body").click(function(event) {
			$(".foot-a ul").hide();
			event.stopPropagation();
		});
		$(".footer-box .foot-a ul").click(function(event) {
			event.stopPropagation();
		});
		$(".float-information").click(function(event){
			event.stopPropagation();
		});
		$(".poplayer").click(function(event){
			$(".float-information").fadeOut();
			$(this).fadeOut();
			event.stopPropagation();
		});
		$(".addbkuai").each(function(event) {
			$(this).click(function(){
				$(".poplayer").show();
				$(".float-information").show();
			});
		});
		$(".better-btn").each(function(event) {
			var oNav_betterbtn=$(this).find(".better-btn").length;
			if(oNav_betterbtn==0){
				$(this).css({"padding": '6% 0 0',"padding-top":"0px","margin-left":"14px"});
			}else if (oNav_betterbtn>0) {
				$(this).css({"padding": '10px 0 0',"padding-top":"10px"});
			};
		});
		$(".explain .close-icon").click(function(){
			$(".poplayer").hide();
			$(".explain").hide();
		});

		/*删除添加的板块*/
		$(".binddelete").each(function(index, element) {
			$(this).click(function(event){
				var id = $(this).attr('id');
				$.get('/Selfhelp/Addplate/binddelete/shelfid/'+id, function(result){
					if(result==1){
						location.href='{$nowaddres}';
					}else{
						alert('删除失败');
					}
				});
				event.stopPropagation();
			})
		});
		/*预览*/
		$(".yulan").each(function(index,element){
			var t = $(this);
			t.click(function(event){
				var yurl = $(this).attr('ref');
				location.href = yurl;
				event.stopPropagation();
			})
		})
		/*选中要添加的板块列表*/
		$("a.ad-btn").each(function(index, element) {
			var t1 = $(this);
			t1.click(function(){
				var getPlateId = $(this).attr("v");
				var nowid =  $("input[name='nowid']").val();
				var nowplateid =  $("input[name='nowplateid']").val();
				$(this).attr("check","true").siblings().attr("check","false");
				//$(this).find("i").html("<img src='/IndexPublic/index6/img/duigou.png'>").parent().siblings().find("i").html(null);
				$(".platepops").hide();
				addplate({$info.id},getPlateId,nowid,nowplateid);
			})
		});
		function addplate(shefid,plateId,nowid,nowplateid){
			$.get('/Selfhelp/Addplate/addp/shelfid/'+shefid+'/plateId/'+plateId+'/nowid/'+nowid+'/nowplateid/'+nowplateid, function(result){
				if(result==1){
					$.get('/Selfhelp/Addplate/deletenowimg/nowid/'+nowid, function(result){
						if(result==1){
							//location.href='{$nowaddres}/random/'+Math.random();
							location.href='{$nowaddres}';
						}else{
							location.href='{$nowaddres}';
						}
					});

				}else{
					alert('操作失败');
				}
			});
		}
		//点击留言
		$("a#liuyan").click(function(){
			$(".poplayer1").show();
			$(".messages-box").show();
			$("#textarea").focus();
		});
		//取消留言弹框
		$(".quxiao").click(function(){
			$("#textarea").val(null);
			$(".poplayer1").hide();
			$(".messages-box").hide();
		});
		//提交留言信息
		$("#tijiao").click(function(){
			var content = $("#textarea").val();
			var savetel_url = "/Selfhelp/Index/talk";
			var teldata = {"content":content,random:Math.random()};
			$.ajax({
				url:savetel_url,
				data:teldata,
				type:"POST",
				dataType:"html",
				success:function (data){
					if(data==1){
						alert("留言成功！");
						$("#textarea").val(null);
						$(".poplayer1").hide();
						$(".messages-box").hide();
						return false;
					}else{
						alert("留言失败，请从新输入！");
						$("#textarea").val(null);
						$("#textarea").focus();
						return false;
					}
				}
			});

		});


		$(".better-text").each(function(event) {
			var oNav_betterbtn=$(this).find(".better-btn").length;
			if(oNav_betterbtn==0){
    			$(this).css({
    				"margin-top": '4%'
    			});
			}else if (oNav_betterbtn>0) {
				$(this).css({
    				"margin-top": '5px'
    			});
			};
		});

		var len=$(".footer-box .abox").length;
        if (len==1) {
            $(".footer-box .abox").css({
                "width": '99%'
            });
            $(".footer-box").css({"width":"100%"});
        };

        var len=$(".footer-box .abox").length;
        if (len==2) {
            $(".footer-box .abox").css({
                "width": '49%'
            });
            $(".footer-box").css({"width":"100%"});
        };

        var len=$(".footer-box .abox").length;
        if (len==3) {
            $(".footer-box .abox").css({
                "width": '32.3%'
            });
            $(".footer-box").css({"width":"100%"});
        };

        var len=$(".footer-box .abox").length;
        if (len==4) {
            $(".footer-box .abox").css({
                "width": '24.65%'
            });
            $(".footer-box").css({"width":"100%"});
        }

	});
</script>
</body>
</html>
